package com.victor.service;

import java.util.List;

import com.victor.entity.comments.CommentPhoto;
import com.victor.entity.comments.Comments;
import com.victor.entity.praise.CommentsPraise;
import com.victor.entity.toreport.ToReport;
import com.victor.entity.toreport.ToreportPhoto;

public interface CommentsService {
	/**
	 * 查询评论
	 * @param type
	 * @param pid
	 * @param uid
	 * @param page
	 * @param row
	 * @param flag
	 * @return
	 */
	List<Comments> selCommentsByTypeAndPid(String type, String pid, String uid, String flag);
	/**
	 * 根据父级id查询
	 * @param id
	 * @param uid 
	 * @return
	 */
	List<Comments> selCommentsByFid(Integer id, String uid);
	/**
	 * 查询 评论点赞表  根据评论id
	 * @param commentid
	 * @param uid 
	 * @return
	 */
	CommentsPraise selCommentsPriaeByCidAndUid(String commentid, String uid);
	/**
	 *添加评论点赞
	 * @param commentsPraise
	 * @return
	 */
	boolean insertCommentsPraise(CommentsPraise commentsPraise);
	/**
	 * 根据评论id 查询点赞数
	 * @param commentid
	 * @return
	 */
	String selCommentsPraiseByCid(String commentid);
	/**
	 * 删除评论点赞
	 * @param id
	 * @return
	 */
	boolean delCommentsPraise(Integer id);
	/**
	 * 添加评论
	 * @param comments
	 * @return
	 */
	boolean insertComments(Comments comments);
	/**
	 * 添加评论图片
	 * @param commentPhoto
	 * @return
	 */
	boolean insertCommentsPhoto(CommentPhoto commentPhoto);
	/**
	 * 添加举报
	 * @param toReport
	 * @return
	 */
	boolean insertToReport(ToReport toReport);
	/**
	 * 添加举报图片
	 * @param toreportPhoto
	 * @return
	 */
	boolean insertToReportPhoto(ToreportPhoto toreportPhoto);

}
